package com.xc.controller.protol;

import com.xc.common.ServerResponse;
import com.xc.service.IUserCashDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author mipha
 * @version 1.0
 * @date 2019/2/24 2:40 PM
 */
@Controller
@RequestMapping("/user/cash/")
public class UserCashDetailController {

    @Autowired
    IUserCashDetailService iUserCashDetailService;

    /**
     *  用户查看资金明细
     * @param request
     * @param pageNum
     * @param pageSize
     * @param positionId
     * @return
     */
    @RequestMapping("list.do")
    @ResponseBody
    public ServerResponse list(HttpServletRequest request,
                               @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
                               @RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
                               @RequestParam(value = "positionId",required = false) Integer positionId){
        return iUserCashDetailService.findUserCashDetailList(positionId,request,pageNum,pageSize);
    }


}
